import requests
from fake_useragent import UserAgent
headers={
    "User-Agent":UserAgent().chrome
}
url="https://www.baidu.com/s"
# 如果url为登录网页，可在params里面加上登录信息
params={
    "wd":"最强大脑"
}
response=requests.get(url,headers=headers,params=params)
print(response.text)